package liangtWorkSpace.springTest.aopAspectJTest.aspect;

import liangtWorkSpace.springTest.aopProxyTest.dao.CustomerDao;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author liangt
 * @ClassName: MyTest
 * @title: MyTest
 * @projectName liangtWorkSpace.springTest.aopAspectJTest.aspect
 * @description: TODO
 * @date 2020/10/13 18:59
 */
public class MyTest {

    @Test
    public void test(){
        String xmlPath = "applicationContextAOP.xml";
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);

        CustomerDao customerDao = (CustomerDao) applicationContext.getBean("customerDao");
        customerDao.add();
    }
}

